package com.kaifamiao.deque;

import java.util.Deque;
import java.util.LinkedList;

public class DequeTest7 {

	public static void main(String[] args) {
		
		Deque<String> stack = new LinkedList<>();
		
		stack.push( "biangbiang面" ); // 压栈
		stack.push( "杨凌蘸水面" );
		stack.push( "岐山哨子面" );
		stack.push( "秦镇米皮" );
		
		System.out.println( stack );
		
		String top = stack.peek(); // 检查栈顶元素(但不移除)
		System.out.println( top );
		System.out.println( stack );
		
		top = stack.pop(); // 弹出栈顶元素(并返回该元素)
		System.out.println( top );
		System.out.println( stack );

	}

}
